﻿@model Hope.Gallery.ViewModels.AdminViewModel

@{
    ViewBag.Title = "Administrare albume";
}

<br />
<br />
<br />
<div class="page-header">
    <h1>Albume</h1>
</div>

<p>Adauga un album nou</p>
<a href="@Url.Action("CreateNew", "Admin")" class="btn small primary">Album nou</a>
<br />
<br />
<br />
<br />
<p>Administreaza albumele existente</p>
<table class="condensed-table">
<thead>
    <tr>
        <th style="width:200px"></th>
        <th>Titlu</th>
    </tr>
</thead>
<tbody>
    @foreach (var item in Model.Albums)
    {
        <tr>
            <th style="width:250px;">
                
                <form action="@Url.Action("upload", "admin")" method="post" style="display:inline-block;">
                    @Html.Hidden("album", item.Title)
                    @Html.Hidden("albumId", item.Id)
                    <input type="submit" class="btn primary" value="Upload" />
                </form>
                
                <form action="@Url.Action("deletealbum", "admin")" method="post" style="display:inline-block;">
                    @Html.Hidden("album", item.Title)
                    @Html.Hidden("albumId", item.Id)
                    <input type="submit" class="btn primary" value="Delete" />
                </form>
                
                @*<a href="#" class="btn small primary">Upload</a>
                <a href="#" class="btn small primary">Delete</a>
                <a href="#" class="btn small primary">Delete All</a>*@
            </th>
            <td>@item.Title</td>
        </tr> 
    }
</tbody>
</table>
